import request from '@/utils/http'

const getListApi = (params) => {
  return request({
    method: 'get',
    url: 'api/student/list',
    params,
  })
}
const deleteApi = (params) => {
  return request({
    method: 'delete',
    url: 'api/student',
    params,
  })
}

const addApi = (data) => {
  return request({
    method: 'post',
    url: 'api/student',
    data,
  })
}
const getDetailApi = (params) => {
  return request({
    method: 'get',
    url: 'api/student',
    params,
  })
}

const batchAddApi = (data) => {
  return request({
    method: 'post',
    url: 'api/student/batchAdd',
    data,
  })
}

const getMajorListApi = () => {
  return request({
    method: 'get',
    url: 'api/student/majorList',
  })
}
const getClassListApi = () => {
  return request({
    method: 'get',
    url: 'api/student/classList',
  })
}

export { getListApi, deleteApi, addApi, getDetailApi, batchAddApi, getMajorListApi, getClassListApi }
